    package com.ruoyi.web.controller.project;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.project.domain.entity.ProjectImplement;
import com.ruoyi.project.domain.query.ProjectImplementQuery;
import com.ruoyi.project.service.IProjectImplementService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

    @RestController
    @RequestMapping("/project/implement")
    @Api(tags = "附件信息", description = "附件信息")
    public class ProjectImplementController {


        @Resource
        private IProjectImplementService service;

        @ApiOperation("分页")
        @GetMapping(value = "/list")
        public R getList(ProjectImplementQuery query) {
            return R.ok(service.getList(query));
        }



        @ApiOperation("新增")
        @PostMapping(value = "/save")
        public R add(@RequestBody ProjectImplement project) {
            return R.ok(service.addInfo(project));
        }


        @ApiOperation("修改")
        @PutMapping (value = "/update")
        public R update(@RequestBody ProjectImplement project) {
            return R.ok(service.updateInfo(project));
        }


        @ApiOperation("删除")
        @DeleteMapping (value = "/{id}")
        public R delete(  @PathVariable("id") String id) {
            return R.ok(service.deleteInfo(id));
        }



        @ApiOperation("详情")
        @GetMapping(value = "/details")
        public R<ProjectImplement> getDetails(@RequestParam String id) {
            return R.ok(service.getById(id));
        }



    }
